<template>
  <div>
    <el-dialog
      :title="title"
      :visible.sync="dialogVisible"
      width="84rem"
      :before-close="tableClose"
    >
      <el-form
        :model="detailForm"
        status-icon
        ref="detailInfoRef"
        label-width="8rem"
      >
        <!-- 第一行 -->
        <el-row>
          <el-col :span="6" :offset="1">
            <el-form-item
              label="加工厂编号："
              prop="processingId"
            >
              <span>{{detailForm.processingId}}</span>
            </el-form-item>
          </el-col>
          <el-col :span="6" :offset="1">
            <el-form-item
              label="成本价："
              prop="price"
            >
              <span>{{detailForm.price}}</span>
            </el-form-item>
          </el-col>
          <el-col :span="6" :offset="1">
            <el-form-item
              label="产品规格："
              prop="specification"
            >
              <span>{{detailForm.specification}}</span>
            </el-form-item>
          </el-col>
        </el-row>
        <!-- 第二行 -->
        <el-row>
          <el-col :span="6" :offset="1">
            <el-form-item
              label="产品编号："
              prop="typeId"
            >
              <span>{{detailForm.typeId}}</span>
            </el-form-item>
          </el-col>
          <el-col :span="6" :offset="1">
            <el-form-item
              label="参考价："
              prop="referPrice"
            >
              <span>{{detailForm.referPrice}}</span>
            </el-form-item>
          </el-col>
          <el-col :span="6" :offset="1">
            <el-form-item
              label="库存备注："
              prop="remark"
            >
              <span>{{detailForm.remark}}</span>
            </el-form-item>
          </el-col>
        </el-row>
        <!-- 第三行 -->
        <el-row>
          <el-col :span="6" :offset="1">
            <el-form-item
              label="产品名称："
              prop="typeName"
            >
              <span>{{detailForm.typeName}}</span>
            </el-form-item>
          </el-col>
          <el-col :span="6" :offset="1">
            <el-form-item
              label="预售价："
              prop="preprice"
            >
              <span>{{detailForm.preprice}}</span>
            </el-form-item>
          </el-col>
          <el-col :span="6" :offset="1">
            <el-form-item
              label="创建时间："
              prop="gmtCreate"
            >
              <span>{{detailForm.gmtCreate}}</span>
            </el-form-item>
          </el-col>
        </el-row>
        <!-- 第四行 -->
        <el-row>
          <el-col :span="6" :offset="1">
            <el-form-item
              label="库存数量："
              prop="count"
            >
              <span>{{detailForm.count}}</span>
            </el-form-item>
          </el-col>
          <el-col :span="6" :offset="1">
            <el-form-item
              label="总金额："
              prop="total"
            >
              <span>{{detailForm.total}}</span>
            </el-form-item>
          </el-col>
          <el-col :span="6" :offset="1">
            <el-form-item
              label="修改时间："
              prop="gmtModified"
            >
              <span>{{detailForm.gmtModified}}</span>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="tableClose">关 闭</el-button>
      </span>
    </el-dialog>
  </div>
</template>

<script>

export default {
  name: "storageInpopup",
  props: {
    detailForm: {
      Object,
      default: {},
    },
    dialogVisible: {
      Boolean,
      default: false,
    },
    //表名
    title: {
      String,
      default: "",
    },
  },
  data() {
    return {};
  },
  methods: {
    //关闭表单
    closeform() {
      var a = false;
      this.$emit("closeDetailDialog", a);
      this.detailDisplayData();
      this.resetForm();
    },

    // 关闭弹窗
    tableClose() {
      // this.$confirm("确认关闭？")
      //   .then(() => {
      //     this.closeform();
      //   })
      //   .catch(() => {});
      var a = false;
      this.$emit("closeDetailDialogB", a);
      this.resetForm();
    },
  },
};
</script>

<style lang="scss" scoped>
</style>